<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
    var $list;
    var $news;
    var $yingping;

    function __construct(){
        parent::__construct();
        $this->list = M('list');
        $this->article = M('article');
        $this->category = M('category');
    }
    function index(){
        //$li=$this->list->order('ctime desc')->select();
        //dump($li);exit;
        $articles=$this->article->limit(0, 6)->select();
        //dump($articles);exit;
        $this->assign("articles",$articles);
        $yingping=$this->article->limit(0, 6)->where("category_id = 4")->select();
            //dump($yingping);exit;
        $this->assign("yingping",$yingping);

        //dump($articles);exit;
        //$this->assign("li",$li);

        $this->display();
    }
}